package com.example.concurrent.chapter03;

/**
 * @author Create By Liuqz
 * @date 2018/11/19 16:14
 */
public class CurrentThread {

    public static void main(String[] args) {
        Thread thread = new Thread(){
            @Override
            public void run() {
                System.out.println(Thread.currentThread() == this);
            }
        };

        thread.start();
        String name = Thread.currentThread().getName();
        System.out.println("main".equals(name));
    }
}
